// 角色管理增删改查
import { baseRequest } from '@/utils/request'
const request = (url, ...arg) => {
    return baseRequest(url, ...arg)
}
export default {
    // 增
    addRole(data) {
        return request('/AddRole', {
            UUID: localStorage.getItem('UUID') ? localStorage.getItem('UUID') : '',
            ...data
        }, 'post')
    },
    // 删
    deleteRole(data) {
        return request('/DeleteRole', {
            UUID: localStorage.getItem('UUID') ? localStorage.getItem('UUID') : '',
            ...data
        }, 'post')
    },
    // 改
    modifyRole(data) {
        return request('/ModifyRole', {
            UUID: localStorage.getItem('UUID') ? localStorage.getItem('UUID') : '',
            ...data
        }, 'post')
    },
    // 查
    getRoles(data) {
        return request('/GetRoles', {
            UUID: localStorage.getItem('UUID') ? localStorage.getItem('UUID') : '',
            ...data
        }, 'post')
    },
    // 获取角色模块权限信息
    getRoleModulePower(data) {
        return request('/GetRoleModulePower', {
            UUID: localStorage.getItem('UUID') ? localStorage.getItem('UUID') : '',
            ...data
        }, 'post')
    },
    // 修改角色模块权限
    modifyRoleModulePower(data) {
        return request('/ModifyRoleModulePower', {
            UUID: localStorage.getItem('UUID') ? localStorage.getItem('UUID') : '',
            ...data
        }, 'post')
    },
}